<template>
  <div class="banner">
    <div
      class="banneritem"
      @click="selecttype(typeid)"
      v-for="(item, index) in banneritemarray"
      :key="index"
    >
      <div class="itemImage"><img :src="item.thumb" alt="" /></div>
      <div class="info">
        <div class="hotMessages">{{ item.name }}</div>
        <div class="particulars">
          <div class="title">
            <span>{{ item.title }}</span>
          </div>
          <br />
          <div class="dest">
            <span>{{ item.dest }}</span>
          </div>
          <div class="item1">
            <span>{{ item.item1 }}</span>
          </div>
        </div>
      </div>
      <van-button
        color="rgb(51, 51, 51)"
        style="color: rgb(255, 255, 255)"
        round
        type="info"
        class="goorder"
        @click="goorder"
        ><van-icon name="arrow"></van-icon
      ></van-button>
    </div>
  </div>
</template>

<script>
export default {
  name: "message",
  props: ["banneritemarray"],
  methods: {
    selecttype: function (index) {
      this.$emit("sendselect", index);
    },
    goorder: function () {
      this.$router.push("/order");
    },
  },
};
</script>
<style scoped>
.particulars[data-v-f46269e2] {
  color: rgb(88, 88, 88);
  font-size: 12px;
}
.goorder {
  position: absolute;
  top: 50px;
  right: 5px;
  width: 10px;
  height: 30px;
  border-radius: 50%;
  color: rgb(0, 0, 0);
  font-size: 13px;
}
.message {
  margin-top: 10px;
  margin-bottom: 50px;
  background-color: rgb(255, 255, 255);
}
.banneritem {
  display: flex;
  position: relative;
  padding: 5px;
  height: 140px;
}
.particulars {
  color: rgb(93, 93, 93);
  font-size: 13px;
  margin-top: 10px;
}
.info {
  flex: 0 0 45%;
  padding: 5px;
  display: flex;
  flex-direction: column;
  margin-left: 5px;
  width: 0;
}
.banneritem img {
  width: 160px;
  height: 120px;
  margin-top: 10px;
  margin-left: 5px;
}
.title {
  float: left;
}
.dest {
  float: left;
  text-align: left;
}
.item1 span {
  padding: 0 2px;
  color: rgb(129, 118, 85);
  border: 1px solid rgb(193, 193, 187);
}
.itemcontent {
  font-size: 15px;
  color: rgb(51, 51, 51);
  text-align: center;
  font-weight: bold;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
</style>
